# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-frameworks
pkgname=kirigami
pkgver=6.1.0
pkgrel=0
pkgdesc="A QtQuick based components set"
arch="all !armhf" # armhf blocked by qt6-qtdeclarative
url="https://community.kde.org/Frameworks"
license="LGPL-2.0-only"
depends_dev="
	kconfig-dev
	kcoreaddons-dev
	kwindowsystem-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	qt6-qtsvg-dev
	"
makedepends="$depends_dev
	extra-cmake-modules
	qt6-qttools-dev
	samurai
	"
subpackages="$pkgname-dev $pkgname-libs $pkgname-lang"
_repo_url="https://invent.kde.org/frameworks/kirigami.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/kirigami-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DKDE_INSTALL_LIBDIR=lib \
		-DBUILD_EXAMPLES=OFF
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
2a75af0bc010120913f092f14760817c197298da4f6fc4780f5ab222de8e385864f4c88b9907acf4b03fea53759f1e2a39a2b62bcd78b8c2c1bc52129c04d207  kirigami-6.1.0.tar.xz
"
